﻿<%@ Page Language="C#" MasterPageFile="~/UI/Main/Main.Master" AutoEventWireup="true" CodeBehind="search_todos.aspx.cs" Inherits="OrganizedIN.UI.ToDo.search_todos" %>
<%@ Register Assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"
    Namespace="AjaxControlToolkit" TagPrefix="cc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="middle_tab">
  	<div id="middle_tab_title" align="center">My ToDos</div>
	<div class="middle_tab_content">
<br />
		<h4>You can Add, Search, Prioritize by Drag-and-Drop, Redate (Add to a future Date), 
            Delete, Archive, Mark as Completed, and Share with your Group by clicking on the 
            below icons:</h4><br />

	</div>

	<div id="icon_link_wrapper" align="center">
		
        <div id="icon_primary_todos" align="center"><a href="Add_New_ToDos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Add New','','../../images/add_02.jpg',1)"><img src="../../images/add_01.jpg" alt="Add New" name="Search" width="75" height="75" border="0" id="Add New" /></a></div>
		
				
		<div id="icon_secondary" align="center"><a href="search_todos.aspx" ><img src="../../images/search_02.jpg" alt="Search" /></a></div>
				
        <div id="icon_secondary" align="center"><a href="priortize_todos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Priortize','','../../images/priortize_02.jpg',1)"><img src="../../images/priortize_01.jpg" alt="Priortize" name="Priortize" width="75" height="75" border="0" id="priortize" /></a></div>
		
		<div id="icon_secondary" align="center"><a href="redate_todos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Re-Date','','../../images/redate_02.jpg',1)"><img src="../../images/redate_01.jpg" alt="Re-Date" name="Re-Date" width="75" height="75" border="0" id="Re-Date" /></a></div>
        
       <div id="icon_secondary" align="center"><a href="archive_todos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Archive','','../../images/archive_02.jpg',1)"><img src="../../images/archive_01.jpg" alt="Archive" name="Archive" width="75" height="75" border="0" id="Archive" /></a></div>	
		
        
       <div id="icon_secondary" align="center"><a href="mark_todos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Mark as Completed','','../../images/mark_02.jpg',1)"><img src="../../images/mark_01.jpg" alt="Mark as Completed" name="Mark as Completed" width="75" height="75" border="0" id="Mark as Completed" /></a></div>
        
        <div id="icon_secondary" align="center"><a href="share_with_group_todos.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Share with group','','../../images/share_02.jpg',1)"><img src="../../images/share_01.jpg" alt="Share with group" name="Share with group" width="75" height="75" border="0" id="Share with group" /></a></div>
                 
	</div><br /><br />
<div class="documents_table">    
	<table width="97%" border="0" cellspacing="1" cellpadding="5" align="center">
      <tr bgcolor="#d8e1f3">
        <td colspan="4">&nbsp;</td>
    </tr>
    <tr bgcolor="#d8e1f3">
        <td width="132" align="right" class="middle_text3">Search by Title/Subject:</td>
        <td width="183" align="left">
                       
            <asp:TextBox ID="txtSearchByTitle" runat="server"></asp:TextBox>
            <cc:AutoCompleteExtender ServiceMethod="GetCompletionList" 
                TargetControlID="txtSearchByTitle" 
                EnableCaching="true"  
                UseContextKey="true" 
                MinimumPrefixLength="1" 
                CompletionSetCount="10" 
                ID="AutoCompleteExtender1" 
                runat="server"
                >
            </cc:AutoCompleteExtender>

        </td>
        <td width="36" align="center" class="middle_text3"><strong>OR</strong></td>
        <td width="349" align="left" class="middle_text3">Search by ToDos Date:
             <strong> 
            <asp:TextBox ID="txtSearchByDate" runat="server"></asp:TextBox>  
             <asp:ImageButton ID="img1" runat="server" ImageUrl="~/images/organizer_ico.gif" 
                 />
            <cc:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtSearchByDate" PopupButtonID="img1">
            </cc:CalendarExtender>
                 
                 <asp:CompareValidator 
                ID="CompareValidator1" runat="server" ControlToValidate="txtSearchByDate" 
                ErrorMessage="Please enter valid Date Time" Operator="DataTypeCheck" 
                Type="Date" Display="Dynamic" ValidationGroup="dateval"></asp:CompareValidator>
            </strong>
            
            </td>
            
        
    </tr>
    <tr bgcolor="#d8e1f3">
        <td align="right" class="middle_text3">Search by Priority:</td>
        <td colspan="2" align="left">
            <asp:DropDownList ID="ddlPriority" runat="server" CssClass="action_list">
                <asp:ListItem Value="0" Text="-Select-" Selected="True"></asp:ListItem>
                <asp:ListItem Value="1" Text="High"></asp:ListItem>
                <asp:ListItem Value="2" Text="Low"></asp:ListItem>            
            </asp:DropDownList>
        </td>
        <td class="middle_text3">Show all ToDos in: 
          <asp:DropDownList ID="ddlDays" runat="server" CssClass="action_list">
                <asp:ListItem Value="0" Text="-Select-" Selected="True"></asp:ListItem>
                <asp:ListItem Value="7" Text="7 Days"></asp:ListItem>
                <asp:ListItem Value="10" Text="10 Days"></asp:ListItem>            
                <asp:ListItem Value="20" Text="20 Days"></asp:ListItem>            
                <asp:ListItem Value="30" Text="30 Days"></asp:ListItem>            
                <asp:ListItem Value="60" Text="60 Days"></asp:ListItem>            
                <asp:ListItem Value="90" Text="90 Days"></asp:ListItem>            
          </asp:DropDownList>
        </td>
    </tr>
    <tr bgcolor="#d8e1f3">
        <td align="right" valign="top" class="middle_text3">Sort ToDos by:</td>
        <td colspan="2" align="left" valign="top">
            <asp:DropDownList ID="ddlSort" runat="server" CssClass="action_list">
                <asp:ListItem Value="0" Text="-Select-" Selected="True"></asp:ListItem>
                <asp:ListItem Value="1" Text="Sort by Date entered"></asp:ListItem>
                <asp:ListItem Value="2" Text="Sort by Subject"></asp:ListItem>            
                <asp:ListItem Value="3" Text="Sort by Priority"></asp:ListItem>            
                <asp:ListItem Value="4" Text="Sort By status"></asp:ListItem>                                  
            </asp:DropDownList>
        </td>   
        <td>
            <asp:Button ID="btnSearch" runat="server" Text="Search" 
                onclick="btnSearch_Click" />
        </td> 
    </tr>
    <tr bgcolor="#d8e1f3">
        <td colspan="4" align="left" style="color: #FF0000">
            <h4><strong><asp:Label ID="lblErrMsg" runat="server" Text=""></asp:Label></strong></h4>
        </td>
      </tr>
    </table>
    <table width="100%" border="0" cellspacing="1" cellpadding="5" align="center">
        <tr bgcolor="#d8e1f3">
            <td align="left" class="middle_text3">
                <asp:DataGrid ID="dgSearchResult" runat="server" AllowPaging="true" AutoGenerateColumns="false" HeaderStyle-ForeColor="Purple"
                PageSize="5" Width="100%" BorderColor="White" >
                    <ItemStyle BorderColor="White" />
                    <Columns>
                        
                        <asp:TemplateColumn HeaderStyle-Width="5%" HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="#c2cee7" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <img src="../../images/document_icon.png" longdesc="#" />                                 
                            </ItemTemplate>
                        </asp:TemplateColumn>                        
                        
                        <asp:BoundColumn DataField="Todo_Summary" HeaderText="Document Name" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>   
                        
                        <asp:BoundColumn DataField="Todo_Description" HeaderText="Description" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>   
                        
                        <asp:BoundColumn DataField="Todo_Status" HeaderText="Status" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>   
                        
                        <asp:BoundColumn DataField="Future_Forwarding_Date" HeaderText="ForwardingDate" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>
                        
                        <asp:BoundColumn DataField="Todo_CreatedDate" HeaderText="CreatedDate" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>
                        
                        <asp:BoundColumn DataField="LastActivityDate" HeaderText="LastActivityDate" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>
                        
                        <asp:BoundColumn DataField="Todo_Priority" HeaderText="Priority" HeaderStyle-BackColor="#c2cee7"
                         HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true">
                        </asp:BoundColumn>
                        
                    </Columns>
                    
                    <PagerStyle Mode="NumericPages" />
                </asp:DataGrid>
            </td>
        </tr>
    </table><br /><br />
</div>    
	<br />
    </div>
</asp:Content>